All Questions
Tagged with text-formattingperl
11 questions
4votes
6answers
5kviews
Format data into a table
How can I get the details and transpose it to horizontal form? Every record ends after Couse. Couse will never be blank or null. Note: These four headers will be there for the below data: Name, City, ...
3votes
4answers
492views
Expanding comma separated list in a tab-delimited file into separate lines
I have a very similar problem to this question, but have no idea how to adapt the answer to my own issue. I have a tab-sep file with 2nd column containing comma-sep list, such as: TRINITY_DN1_c0_g1 ...
0votes
3answers
571views
Script for formatting code into columns
Often I have code that I want to align based on similar structure of lines, not just the left-side auto indent. Is there a script out there that can do something like this? Here is an example of ...
0votes
3answers
2kviews
Extract module name and instance name from verilog/System Verilog file
I have a verilog/System Verilog file from which I want to extract only module_name and instance_name. From following single line: module_name #(.ANY_PARAMETER(.ANY_PARAMETER),.ANY_PARAMETER_1(....
1vote
1answer
1kviews
Convert XLS file to CSV file in perl without using spreadsheet [closed]
I have a file in .XLS format and I want to load that file on Informatica, for which I need to convert that file to .CSV, i.e. XLS to CSV.
1vote
2answers
172views
How to merge lines (of a multi-line code routine)
I have a file; contents are as follows: cat -n /tmp/my_file 1 verify(abc) { 2 foo : bar; 3 sub1(aa) { 4 line1; 5 } 6 sub2 (bb) { 7 line1; 8 // this line is a comment ...
6votes
2answers
123views
number headings
I need to convert whitespace to a tiered, numbered list and have found this elusive. This is the sort of thing I'm after: Input (visible): Project #1 Subproject Task ...
1vote
2answers
140views
Reformatting Text Files w/ Perl
Very new to Perl here, and having some issues with reformatting a simple tab-delimited text file. I have data in the following sample format: My issue is that I need to have it formatted like so, for ...
0votes
2answers
821views
perl script to manipulate output (generated from a command line) [closed]
current stuation- I run this line: Xxxcommand | mail -s 'test on' [email protected] then I will have the output like below in my email Name Files(n) Space Calculation Adam 12345 ...
4votes
1answer
6kviews
Replace matching parentheses with enclosing content
What is a simple way to find matching consecutive pairs of parentheses and replace them with their enclosing content using sed/awk in bash? A minimal example would be: Input: (body1) Output: body1 ...
1vote
7answers
3kviews
How do I extract multiple strings which are comma delimited from a log file?
I need to extract certain strings from a log file although the strings are NOT in a standardized field/column. For example: date="2017-01-03 08:30:02 -0500",fac=f_kernel_ipfilter,area=a_general_area,...